import request from '../utils/request'

//登录
export function getByUser (data) {
    return request.post(`user/Login`, data)
}
//修改密码
export function UpdateUser (data) {
    return request.put(`user/UserUpdate`, data)
}
//注册
export function CreateUser(data){
    return request.post(`user`,data)
}

//获得所有推荐新闻
export function GetArticles(){
    return request.get(`article/Articles`)
}
//成功点赞
export function AddLike(data){
    return request.post(`UserLike`,data)
}
//点赞数
export function LikeCount(id){
    return request.get(`UserLike/LikeCount/${id}`)
}
//根据文章id获得对应评论
export function getComment(id){
    return request.get(`http://localhost:5000/Comment/article/${id}`)
}
//根据用户id来获得对应用户信息
export function getUserOne(id){
    return request.get(`http://localhost:5000/user/getUserOne/${id}`)
}